#ifndef CANDEVICEFORM_H
#define CANDEVICEFORM_H

#include <QWidget>
#include "mymodel.h"

#define CANDeviceFormIns CANDeviceForm::Instance()

namespace Ui {
class CANDeviceForm;
}

class CANDeviceForm : public QWidget
{
    Q_OBJECT

public:
    explicit CANDeviceForm(QWidget *parent = nullptr);
    ~CANDeviceForm();

    static CANDeviceForm *Instance();


private slots:
    void on_flushUIBMS208(int InsResVal);
    void on_flushUIBMS36A(double maxCellVolt, double minCellVolt, double maxCvNO, double MinCvNO);
    void on_flushUIBMS36B(double maxCellTemp,double maxCtNO,double minCellTemp,double minCtNO,double avrgCellTemp);
    void on_flushUIBMS35A(double chgPwr, double disChgPwr, double chgAmount, double disChgAmount);
    void on_flushUIBMS39B(int Insulation_Fault, int BMS_Interlock_Fault);
    void on_flushUIVCU253(int hV_bat_power_enable, int vehicle_charge_state);

private:
    Ui::CANDeviceForm *ui;

    MyModel *m_BMS208Model;
    MyModel *m_BMS39BModel;
};

#endif // CANDEVICEFORM_H
